home *** CD-ROM | disk | FTP | other *** search
/ Beginning Mac Programming / Beginning Mac Programming.bin / pc / Open Me for REALbasic 3 / REALbasic 3.2 / Goodies / 3rd Party Demos / 3rd Party Plugins / Graphics / TWAINPlug / Read Me < prev    next >
Encoding:
Text File  |  2000-12-19  |  3.7 KB  |  55 lines

  1. TWAINPlug 1.1 for REALbasic 2.x
  2.  
  3. Created Dec 2000 by Kliment Stefanovski
  4. Last edit: 19 Dec 2000
  5.  
  6. The plugin is shareware ($24.99).
  7.  
  8. Registration site:
  9.     <http://order.kagi.com/?LKX>
  10.  
  11. Contact (bugs and requests):
  12.  <kliment@kagi.com>
  13.  
  14. Introduction
  15.  
  16. The TWAINPlug plugin is a Macintosh REALbasic 2.x plugin that extends the capabilities of REALbasic 2.x for importing images from TWAIN compatible scanners and cameras directly in your REALbasic 2.x applications, whether in the debugger or, when compiling with the plugin in the appropriate place, in the built application. The developer is abstracted form the complexity of the TWAIN protocol and simply binds the calls to the plugin with REALbasic code. The acquisition device specific TWAIN user inteface is presented with the simplicity of a single line of code, and the image that is sent to the program can be inserted directly as a REALbasic picture (from where it can be manipulated and saved using REALbasic commands the developer writes).
  17.  
  18. The files in the .sit archive are the plugin itself (TWAINPlug), a Test Project for REALbasic, this SimpleText document (Read Me) and links to the RealNice web site and the email of the author.
  19.  
  20.  
  21. Change History
  22.  
  23. This is the second verion of the plugin (1.1). A new termination process was added due to problems with closing the UI with some TWAIN drivers (e.g. Epson).
  24.  
  25.  
  26. Using the TWAINPlug
  27.  
  28. The plugin works only for programs on Macintosh (no Windows support). To use the TWAINPlug you need to put it in the Plugins folder located in the REALbasic 2.x folder before you launch the REALbasic IDE. If everything is in order with your installation, once you launch the REALbasic IDE, the icon of the TWAINPlug should be located in the Tool palette. You can drag-and-drop the icon from the Tool palette on the window of your application or use code directly in the code window.
  29.  
  30. The included Test Project is compose of a window that contains a Canvas and a PushButton. In the Action method of the PushButton you will find the code needed to acquire an image using the TWAINPlug. 
  31.  
  32. Sub Action()
  33.  
  34.    Dim MyTWAINPic as Picture         //Declaring the Picture Object (I have chosen the name MyTWAINPic, can be any legal object name)
  35.  
  36.    MyTWAINPic = Twain_Acquire      //Calling the TWAINPlug code for displaying the device specific TWAIN UI
  37.                                                            //The returned object is a REALbasic Picture, so the call to the method is directly linked to a Picture Object
  38.    Canvas1.backdrop = MyTWAINPic  //Display the returned picture on the Canvas
  39.  
  40. End Sub
  41.  
  42.  
  43.  
  44. Testing and compiling the plugin
  45.  
  46. Current test platforms have been iMac 266 MHz and PowerMac G4 400 MHz with the TWAIN compatible UMAX Astra 2100U. That is why you are encouraged to test the DEMO version on your system first with your applications and devices, and then if you find the plugin working correctly and you want to register, do so on <http://order.kagi.com/?LKX> after which you will recieve the unlimited version (no dialog boxes reminding you of the verion and asking for registartion) within 5 days by email.
  47.  
  48.  
  49. Known issues
  50.  
  51. If the aquisition device is not set up or connected properly, the TWAINPlug will detect the error and display a warning alertbox. The developer is responsible for making sure that the next call to the plugin is made after the connections and setup are done properly, since a second call to the TWAINPlug with an inappropriate setup or connections will result in a Type 2 error (known bug with the Mac TWAIN libraries).
  52.  
  53.  
  54.  
  55. Copyright® 2000 by Kliment Stefanovski, RealNice. Use of the plugin is allowed only with a verion that is downloaded directly from http://welcome.to/RealNice. It is forbidden to distribute the TWAINPlug without the prior knowledge of the author.